#窗口
WIDTH = 800
HEIGHT = 600

# 棋盘
## 颜色定义
LINE_COLOR = (0, 0, 0)        # 线条颜色 (黑色)
## 棋盘参数
BOARD_SIZE = 15  # 15x15 的棋盘
MARGIN = 30      # 棋盘边距
GRID_SIZE = min(WIDTH - 2 * MARGIN, HEIGHT - 2 * MARGIN) // (BOARD_SIZE - 1)
## 重新计算边距以使棋盘居中
BOARD_WIDTH = GRID_SIZE * (BOARD_SIZE - 1)
BOARD_HEIGHT = GRID_SIZE * (BOARD_SIZE - 1)
START_X = (WIDTH - BOARD_WIDTH) // 2   # 棋盘左上角坐标
START_Y = (HEIGHT - BOARD_HEIGHT) // 2
## 棋盘定位(二维数列)
CHESS_POS = tuple(tuple((START_X + i*GRID_SIZE,
                                  START_Y + j*GRID_SIZE) for j in range(15))
                                for i in range(15))